package com.baizhi.controller;

import com.baizhi.entrty.Article;
import com.baizhi.entrty.Guru;
import com.baizhi.service.ArticleService;
import com.baizhi.service.GuruService;
import com.baizhi.service2.ArticleService2;
import com.baizhi.service2.GuruService2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
public class ArticleController {
    @Autowired
    private ArticleService as;
    @Autowired
    private ArticleService2 as2;

    @RequestMapping("fya")
    @ResponseBody
    public Map fy(int page, int rows){

        return as.fy(page,rows);
    }

    @RequestMapping("inserta")
    @ResponseBody
    public Map insert(Article ar){

        return as2.insert(ar);
    }

    @RequestMapping("deletea")
    @ResponseBody
    public Map delete(int[] id){

        return as2.delete(id);
    }



}
